#pragma once
#include "sensordatainput.h"
#include "ReconstructByKinectCommonGlobal.h"
#include <XnOS.h>
#include <XnCppWrapper.h>

class OpenNIContextManager;

class _LIB_CLASS SensorDataKinectInput : public SensorDataInput
{
	friend class OpenNIContextManager;
private:

	xn::Device _device;
	xn::DepthGenerator _depth;
	xn::ImageGenerator _image;
	xn::DepthMetaData _depthMD;
	xn::ImageMetaData _imageMD;

	virtual bool _grabFrame();

public:

	SensorDataKinectInput (const std::string &name,
			const std::string &intrinsicFile = "../Data/Calibration/default.dat",
			const std::string &extrinsicFile = "");

	virtual ~SensorDataKinectInput ();

	void initial ();

};